﻿namespace SubsDownloader.Core.Entities
{
    public class TitleResult
    {
        private string _name;

        public string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                if (_name.Contains("&"))
                    _name = _name.Replace("&amp;", "&");
            }
        }

        public string Id { get; set; }

        public bool IsSeries { get; set; }

        public string Year { get; set; }

        public string Url { get; set; }
      
        public TitleFileInfo Title { get; private set; }

        public TitleResult ( TitleFileInfo title )
        {
            Title = title;
        }

        public override string ToString()
        {
            return Name;
        }       
    }
}